<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link
	href="$!webPath/resources/style/system/manage/$!{config.websiteCss}/template.css"
	rel="stylesheet" type="text/css" />
<script src="$!webPath/resources/js/jquery-1.8.3.min.js"></script>
<script src="$!webPath/resources/js/jquery.validate.min.js"></script>
<script>
jQuery(document).ready(function(){
//设置默认状态以及判断初始显示状态
	var state = jQuery("#display").val();
	if(state==""){
		jQuery("#display").val("true");
		jQuery("#displayOff").hide();
	}else{
		 if(state=="true"){
			jQuery("#displayOff").hide();
		}else{
			jQuery("#displayOn").hide();
		}
	}
	
	var state1 = jQuery("#recommend").val();
	if(state1==""){
		jQuery("#recommend").val("true");
		jQuery("#recommendOff").hide();
	}else{
		 if(state1=="true"){
			jQuery("#recommendOff").hide();
		}else{
			jQuery("#recommendOn").hide();
		}	
	}	
//
 	//改变系统提示的样式
  jQuery("span .w").mousemove(function(){
	var id=jQuery(this.parentNode).attr("id");
	if(id="nothis"){
	   jQuery(this.parentNode).attr("id","this")
	}
  }).mouseout(function(){
     var id=jQuery(this.parentNode).attr("id");
	 if(id="this"){
	   jQuery(this.parentNode).attr("id","nothis")
	 }
  });
jQuery("#pid").val("$!obj.parent.id");
jQuery("#goodsTypeId").val("$!obj.goodsType.id");
//
  jQuery("#theForm").validate({
    rules:{
	  className:{
	    required :true,
	     remote:{
		    url: "$!webPath/admin/goods_class_verify.htm",     //后台处理程序
            type: "post",               //数据发送方式
            dataType: "json",           //接受数据格式   
            data: {                     //要传递的数据
                  "className": function(){return jQuery("#className").val();},
				  "id":function(){return jQuery("#id").val()},
				  "pid":function(){return jQuery("#pid").val()}
		     }
			}
	  }
	 },
	messages:{
	  className:{required:"分类名称不能为空",remote:"该分类已经存在"}
	}
  });
  //图标
  jQuery("#pid").change(function(){
	 var val = jQuery(this).val();
	  if(val==""){
		 jQuery("#icon").show(); 
		 jQuery("#icon_sys_ul").show();
		  }else{
		 jQuery("#icon").hide();	
		 jQuery("#icon_sys_ul").hide();  
		 jQuery("#icon_acc_ul").hide(); 
			  }
	  });
  jQuery("input[type='radio']").click(function(){
	 var val = jQuery(this).attr("value");
	  if(val==1){
	  jQuery("#icon_sys_ul").hide();
	  jQuery("#icon_acc_ul").show();	  
	  }else{
	  jQuery("#icon_sys_ul").show();
	  jQuery("#icon_acc_ul").hide();		  
	  }
  });
  jQuery(".icon_sys a").click(function(){
	  jQuery("#icon_sys").val(jQuery(this).attr("icon"));
	  jQuery(this).parent().find("a").removeClass("this");
	  jQuery(this).addClass("this");
	  });
   jQuery("#icon_acc").change(function(){
	 jQuery("#textfield1").val(jQuery("#icon_acc").val());
   })
     jQuery("#logoShow").mouseover(function(){
	    jQuery("#logoImg").css('display','block');
   }).mouseout(function(){
		jQuery("#logoImg").css('display','none');
	});
#if($!obj.icon_type)	
#if($!obj.icon_type==0)
jQuery("#icon_sys_ul").show();
jQuery("#icon_acc_ul").hide();
jQuery(".icon_sys a").removeClass("this");
jQuery(".icon_sys a[icon='$!obj.icon_sys']").addClass("this");
#else
jQuery("#icon_sys_ul").hide();
jQuery("#icon_acc_ul").show();
#end
#end
#if($!obj.parent.id)
jQuery("#icon").hide();	
jQuery("#icon_sys_ul").hide();  
jQuery("#icon_acc_ul").hide();
#end	
});


function saveForm(method){
   jQuery("#theForm").submit();
}

//设置显示开关
function displayState(){
	var state = jQuery("#display").val();
	if(state=="true"){
		jQuery("#display").val("false");
		jQuery("#displayOff").show();
		jQuery("#displayOn").hide();
	}else{
		jQuery("#display").val("true");
		jQuery("#displayOff").hide();
		jQuery("#displayOn").show();
	}
}

//设置推荐开关
function recommendState(){
	var state = jQuery("#recommend").val();
	if(state=="true"){
		jQuery("#recommend").val("false");
		jQuery("#recommendOff").show();
		jQuery("#recommendOn").hide();
	}else{
		jQuery("#recommend").val("true");
		jQuery("#recommendOff").hide();
		jQuery("#recommendOn").show();
	}
}
</script>
</head>
<body>
	<div class="cont">
		<h1 class="seth1">客户编辑</h1>
		<div class="settab">
			<span class="tab-one"></span> <span class="tabs"> <a
				href="$!webPath/admin/crm_down_list.htm">管理</a> #if($!edit) | <a
				href="javascript:void(0);" class="this">编辑</a> #end  |<a
				href="$!webPath/admin/crm_down_edit.htm" class="">新增</a>
			</span> <span class="tab-two"></span>
		</div>
		<form name="theForm" id="theForm"
			action="$!webPath/admin/crm_down_save.htm" method="post"
			enctype="multipart/form-data">
			<input name="id" type="hidden" id="id" value="$!obj.id" /> <input
				name="currentPage" type="hidden" id="currentPage"
				value="$!currentPage" /> <input name="list_url" type="hidden"
				id="list_url" value="$!webPath/admin/goods_class_list.htm" /> <input
				name="add_url" type="hidden" id="add_url"
				value="$!webPath/admin/goods_class_add.htm" />
			<div class="setcont">
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>企业名称</li>
					<li><span class="webname"> <input name="ent_name"
							 "text" id="ent_name" value=" $!obj.ent_name"
							size="40" />
					</span></li>
				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>平台类别</li>
					<li><span class="webname"> 
					<select name="platform_type" id="type"  >
                             #if($!obj.platform_type == "卖家") 
								<option value="卖家">卖家</option>
								<option value="买家">买家</option> #else
								<option value="买家">买家</option>
								<option value="卖家">卖家</option> #end
						</select>
					</span></li>
				</ul>


				<ul class="set1">
					<li><strong class="orange fontsize20">*</strong>线索来源</li>
					<li><span class="webname"> <input name="clue_source"
							type="text" id="clue_source" value="$!obj.clue_source" size="40" />
					</span></li>
				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>等级</li>
					<li><span class="webname"> 
					<select name="grade" id="type"  >
                              #if($!obj.grade == 1) 
						   <option value="1">意见一般</option>
						  <option value="2">意见强烈</option>
						  <option value="0">无意见</option>
						   #elseif($!obj.grade == 2)   
						 <option value="2">意见强烈</option>
						  <option value="0">无意见</option>   
						<option value="1">意见一般</option> 
						   #elseif($!obj.grade == 0)    
						  <option value="0">无意见</option> 
						 <option value="1">意见一般</option>
						  <option value="2">意见强烈</option>
						  #else  
						  <option value="0">无意见</option> 
						 <option value="1">意见一般</option>
						  <option value="2">意见强烈</option>
						   #end
						</select>
					</span></li>
				</ul>
				
					<ul class="set1">
					<li><strong class="orange fontsize20"></strong>详细地址</li>
					<li><span class="webname"> <input name="per_subject"
							type="text" id="per_subject" value="$!obj.per_subject" size="40" />
					</span></li>
				   </ul>
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>经营主体</li>
					<li><span class="webname"> <input name="oper_address"
							type="text" id="oper_address" value="$!obj.oper_address" size="40" />
					</span></li>
				   </ul>
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>主营行业</li>
					<li><span class="webname"> <input name="main_business"
							type="text" id="main_business" value="$!obj.main_business" size="40" />
					</span></li>
				   </ul>
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>经营年限</li>
					<li><span class="webname"> <input name="oper_life"
							type="text" id="oper_life" value="$!obj.oper_life" size="40" />
					</span></li>
				   </ul>
				   
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>场地面积</li>
					<li><span class="webname"> <input name="site_area"
							type="text" id="site_area" value="$!obj.site_area" size="40" />
					</span></li>
				   </ul>
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>场地是否租用</li>
					<li><span class="webname"> 
					<select name="rented" id="type"  >
                             #if($!obj.rented == true) 
								<option value="true">是</option>
								<option value="false">否</option> 
								#else
								<option value="false">否</option>
								<option value="true">是</option>
								 #end
						</select>
					</span></li>
				   </ul>
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>自有设备</li>
					<li><span class="webname"> <input name="own_equipment"
							type="text" id="own_equipment" value="$!obj.own_equipment" size="40" />
					</span></li>
				   </ul>
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>税点</li>
					<li><span class="webname"> <input name="tax_point"
							type="text" id="tax_point" value="$!obj.tax_point" size="40" />
					</span></li>
				   </ul>
				   
				   
				   
				   		<ul class="set1">
					<li><strong class="orange fontsize20"></strong>经营范围</li>
					<li><span class="webname"> <input name="oper_scope"
							type="text" id="oper_scope" value="$!obj.oper_scope" size="40" />
					</span></li>
				   </ul>
				   
				   
				   
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>工人数量</li>
					<li><span class="webname"> <input name="num_workers"
							type="text" id="num_workers" value="$!obj.num_workers" size="40" />
					</span></li>
				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>月营业额</li>
					<li><span class="webname"> <input name="mon_turnover"
							type="text" id="mon_turnover" value="$!obj.mon_turnover" size="40" />
					</span></li>
				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>证件类型</li>
					<li><span class="webname"> <input name="cred_type"
							type="text" id="cred_type" value="$!obj.cred_type" size="40" />
					</span></li>
				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>企业证件</li>
					<li><span class="webname"> <input name="ente_Certificate"
							type="text" id="ente_Certificate" value="$!obj.ente_Certificate" size="40" />
					</span></li>
				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>污水处理资质</li>
					<li><span class="webname"> <input name="Qua_sewage_treatment"
							type="text" id="Qua_sewage_treatment" value="$!obj.Qua_sewage_treatmente" size="40" />
					</span></li>

				</ul>
				<ul class="set1">
					<li><strong class="orange fontsize20"></strong>环评资质</li>
					<li><span class="webname"> <input name="EIA_qualification"
							type="text" id="EIA_qualification" value="$!obj.EIA_qualification" size="40" />
					</span></li>

				</ul>
				</ul>













			</div>
		</form>
		<div class="submit">
			<input name="save" type="button" value="提交" onclick="saveForm()" />
		</div>
	</div>
</body>
</html>